/*!
 *file name : demo.c
 *author :hu
 *
 *description:
 */
#include "xxx.h"
#include "frame_deal.h"


//可以合理设计结构体进行管理
UINT8 receiveBuffer[REC_AX];
UINT8 frameBuffer[FRAME_MAX];
UINT8 receiveLen;//接收到的数据长度
UINT8 frameLen;//提取出的数据帧的长度

 int main(void)
{
	/*do sth*/

	while(1)
	{
		/*do sth*/
		
		if(receiveFinish)
		{
			receiveFinish=0;
			if(dataCheck(receiveBuffer,receiveLen,frameBuffer,&frameLen))//识别到合法数据帧
			{
				frameHandle(frameBuffer,frameLen);//处理数据帧
			}			
		}

	}
}
